﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="acpIncluirContratoGestor.aspx.cs" Inherits="Protegidos_Administracao_Cadastros__popup_acpIncluirContratoGestor" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<%@ Register TagPrefix="uc1" TagName="HeadTag"  Src="~/_includes/HeadTag.ascx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <!-- Includes -->
    <uc1:HeadTag ID="HeadTag1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
        <script type="text/javascript">
            function CloseAndRebind(args) {
                GetRadWindow().Close();
                GetRadWindow().BrowserWindow.refreshGrid(args);
            }

            function GetRadWindow() {
                var oWindow = null;
                if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)

                return oWindow;
            }

            function CancelEdit() {
                GetRadWindow().Close();
            }
        </script>
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        
        <table width="99%" align="right">
            <tr>
                <td>
                    <div class="SuTituloVR">Contrato(s)</div>
                </td>
            </tr>
            
            <tr>
                <td align="right">
                <br />
                    
                    <telerik:RadGrid ID="RadGrid1" Width="100%" Skin="Telerik" 
                            runat="server" AllowPaging="True" AllowSorting="True"
                            GridLines="None" AutoGenerateColumns="false" PageSize="10" OnNeedDataSource="RadGrid1_NeedDataSource"
                            OnItemCommand="RadGrid1_ItemCommand" >
                            <MasterTableView GridLines="None" DataKeyNames="IdContrato">
                                <Columns>
                                    <telerik:GridBoundColumn UniqueName="Descricao" HeaderText="Descricao" DataField="Descricao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataInicioVigencia" HeaderText="DataInicioVigencia" DataField="DataInicioVigencia" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataFimVigencia" HeaderText="DataFimVigencia" DataField="DataFimVigencia" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataProrrogacao" HeaderText="DataProrrogacao" DataField="DataProrrogacao" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn UniqueName="DataRescindir" HeaderText="DataRescindir" DataField="DataRescindir" ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                    <telerik:GridHyperLinkColumn DataTextFormatString="Vizualizar"
                                        DataNavigateUrlFields="Path" UniqueName="Path" DataNavigateUrlFormatString="http://localhost/gentev1/{0}" Target="_blank"
                                        HeaderText="Imagem" DataTextField="Path">
                                    </telerik:GridHyperLinkColumn>
                                    <telerik:GridButtonColumn CommandName="Select" Text="Selecionar" UniqueName="SelectColumn" />
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>  
                    
                </td>
            </tr>
            <tr>
                <td align="right">
                <br />
                    <asp:Button ID="btnFechar" runat="server" Text="Fechar" Width="110px" 
                        onclick="btnFechar_Click"/>
                </td>
            </tr>
        </table>
    
    </form>
</body>
</html>
